<template>
  <div class="navbar">
    <div class="wrapper">
      <logo/>
      <search/>
      <cart/>
    </div>
    <div class="category">
      <div class="category-menu">
        <span>
        所有分类
        </span>
        <div class="child-menu">
          <ul>
            <li>
              <a href="">洗衣机</a>
            </li>
            <li>
              <a href="">洗衣机</a>
            </li>
            <li>
              <a href="">洗衣机</a>
            </li>
            <li>
              <a href="">洗衣机</a>
            </li>
            <li>
              <a href="">洗衣机</a>
            </li>
          </ul>
        </div>
      </div>
      <div class="item-menu">
        <span>
          宠物用品
        </span>
        <div class="child">
          <ul>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米英寸</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">65英寸</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米壁画</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米寸</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米壁</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米壁画</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
          </ul>
        </div>
      </div>
      <div class="item-menu">
        <span>
          运动用品
        </span>
        <div class="child">
          <ul>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米英寸</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">65英寸</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米壁画</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米寸</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米壁</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米壁画</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
          </ul>
        </div>
      </div>
      <div class="item-menu">
        <span>
          服装用品
        </span>
        <div class="child">
          <ul>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米英寸</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">65英寸</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米壁画</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米寸</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米壁</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米壁画</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
          </ul>
        </div>
      </div>
      <div class="item-menu">
        <span>
          宠物用品
        </span>
        <div class="child">
          <ul>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米英寸</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">65英寸</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米壁画</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米寸</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米壁</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
            <li class="product">
              <a href="" target="_blank">
                <div class="pro-img">
                  <img src="https://cdn.cnbj0.fds.api.mi-img.com/b2c-mimall-media/df9b3e7a562e02a33eb069b3f0119815.png"
                       alt="">
                </div>
                <div class="pro-name">小米壁画</div>
                <div class="pro-price">6999元</div>
              </a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import logo from "~/components/navbar/logo";
import search from "~/components/navbar/search";
import cart from "~/components/navbar/cart";

export default {
  name: "navbar",
  components: {
    logo,
    search,
    cart
  }
}
</script>

<style lang="scss" scoped>
@import '@/assets/config.scss';

.navbar {
  height: 170px;
  background: #fff;
  //border-bottom: 2px solid #31bbAC;
  //line-height: 115px;
  .wrapper {
    height: 110px;
    margin: 0 auto;
    width: 1200px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .category {
    position: relative;
    height: 72px;
    margin: 0 auto;
    width: 1200px;
    display: flex;
    flex-direction: row;
    //justify-content: space-between;
    align-items: center;
    //margin-bottom: 10px;

    a {
      color: #31bbAC;
      font-size: 16px;
    }

    .category-menu {
      width: 200px;
      height: 50px;
      line-height: 50px;
      background-color: #FFFFFF;
      text-align: center;
      margin-right: 30px;

      &:hover {
        .child-menu {
          //height: 220px;
          opacity: 1;
        }
      }

      .child-menu {
        margin-top: -2px;
        position: absolute;
        //background-color: #FFFFFF;
        width: 198px;
        height: 451px;
        //border: 1px solid #31bbAC;
        opacity: 1;
        overflow: hidden;
        z-index: 11;
        transition: all .5s;


        li {
          height: 40px;
          //border-bottom: 0.5px solid #fff;
        }
      }

      span {
        //font-size: 16px;
        cursor: pointer;
        font-size: 1.5rem;
        font-weight: bold;
        //color: #FFFFFF;


      }
    }

    .item-menu {
      margin-left: 10px;
      display: inline-block;
      margin-right: 15px;

      &:hover {
        color: $colorA;

        .child {
          height: 220px;
          opacity: 1;
        }
      }

      .child {
        position: absolute;
        top: 60px;
        left: 0;
        height: 0;
        width: 1200px;
        background-color: #FFFFFF;
        opacity: 0;
        overflow: hidden;
        //border-top: 1px solid #E5E5E5;
        box-shadow: 0 7px 6px 0 rgba(0, 0, 0, 0.11);
        z-index: 12;
        transition: all .5s;

        .product {
          position: relative;
          float: left;
          width: 16.6%;
          height: 220px;
          font-size: 12px;
          line-height: 12px;
          text-align: center;

          a {
            display: inline-block;
          }

          img {
            width: auto;
            height: 111px;
            margin-top: 26px;
          }

          .pro-img {
            height: 137px;
          }

          .pro-name {
            font-weight: bold;
            margin-top: 19px;
            margin-bottom: 8px;
            color: $colorB;
          }

          .pro-price {
            color: $colorA;
          }

          &:before {
            content: ' ';
            position: absolute;
            top: 28px;
            right: 0;
            border-left: 1px solid $colorF;
            height: 100px;
            width: 1px;
          }

          &:last-child:before {
            display: none;
          }
        }
      }

      span {
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
      }
    }

  }

  //box-shadow: 0 2px 27px 0 rgba(0, 0, 0, 0.10);

  //.wrapper {
  //  margin: 0 auto;
  //  width: 1200px;
  //
  //
  //  .navbar-search {
  //    height: 100px;
  //    display: flex;
  //    align-items: center;
  //  }
  //
  //  .navbar-item {
  //    margin-top: 15px;
  //  }
  //}
}
</style>
